// 首页-热门推荐接口
import type { PageParams } from "@/types/global"
import type { HotResult } from "@/types/hot"
import { http } from "@/utils/http"

// 通用热门推荐数据类型-data传递的参数 (因为分页数据一样, 可复用, &是交叉类型 可插入新参数) (可选)
type HotParams = PageParams & { subType?: string }

export const getHotRecommendAPI = (url: string, data?: HotParams) => {
    return http<HotResult>({
        method: 'GET',
        url,
        data
    })
}